﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TimKen.BussLogic;
using TimKen.App;

namespace TimKen.Web
{
    public partial class Contact : WebPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        protected void BindData()
        {
            JobManager jm = new JobManager();
            System.Data.DataSet ds = jm.GetList(AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, LanguageID);
            AspNetPager1.RecordCount = Convert.ToInt32(ds.Tables[1].Rows[0]["total"]);

            this.RptJob.DataSource = ds.Tables[0].DefaultView;
            this.RptJob.DataBind();
            this.RepDeatail.DataSource = ds.Tables[0].DefaultView;

            this.RepDeatail.DataBind();
        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            BindData();
        }
    }
}